package mock;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

import android.content.res.Resources;
import app.timetogo.R;

public class MockResources extends Resources {

	public MockResources() {
	}

	@Override
	public InputStream openRawResource(int id) throws NotFoundException {
		try {
			if(id == R.raw.app) {
				return new FileInputStream("res0/raw/app.properties");
			} else {
				throw new NotFoundException("Could not find resource with id:" + id);
			}
		} catch (FileNotFoundException e) {
			throw new NotFoundException("Could not find resource with id:" + id, e);
		}
	}


}
